by Anonymous (267 Submissions)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 12th June 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Translate bin>hex and hex>bin again.
var %temp = $1-
var %output
while (%temp) {
var %char = $chr($base($left(%temp,8),2,10))
%output = %output $+ $iif(%char == $chr(32),$chr(1),%char)
%temp = $right(%temp,-8)
}
return $replace(%output,$chr(1),$chr(32))
}
alias bin.encode {
var %output
var %temp = $1-
while (%temp) {
%output = %output $+ $base($asc($left(%temp,1)),10,2,8)
%temp = $right(%temp,-1)
}
return %output
}